-- GENERATED SPELL FOR [Unrelenting Rider] --


function spell0_16126(pUnit, Event) --@Shadow Bolt Volley,Self--
pUnit:FullCastSpellOnTarget(27831,pUnit)
pUnit:RegisterEvent('Sorts_16126', 1500, 1)
end

function spell1_16126(pUnit, Event) --@Shadow Bolt Volley,Self--
pUnit:FullCastSpellOnTarget(55638,pUnit)
pUnit:RegisterEvent('Sorts_16126', 1500, 1)
end

function spell2_16126(pUnit, Event) --@Summon Assistants,Self--
pUnit:FullCastSpellOnTarget(29316,pUnit)
pUnit:RegisterEvent('Sorts_16126', 609, 1)
end

function spell3_16126(pUnit, Event) --@Unholy Aura,Self--
pUnit:FullCastSpellOnTarget(55606,pUnit)
pUnit:RegisterEvent('Sorts_16126', 0, 1)
end

function spell4_16126(pUnit, Event) --@Unholy Aura,Self--
pUnit:FullCastSpellOnTarget(55608,pUnit)
pUnit:RegisterEvent('Sorts_16126', 0, 1)
end

function Sorts_16126(pUnit, Event)
local choix_sorts_16126 = math.random(0, 4)
if choix_sorts_16126 == 0 then
pUnit:RegisterEvent('spell0_16126', 1, 1)
end
if choix_sorts_16126 == 1 then
pUnit:RegisterEvent('spell1_16126', 1, 1)
end
if choix_sorts_16126 == 2 then
pUnit:RegisterEvent('spell2_16126', 1, 1)
end
if choix_sorts_16126 == 3 then
pUnit:RegisterEvent('spell3_16126', 1, 1)
end
if choix_sorts_16126 == 4 then
pUnit:RegisterEvent('spell4_16126', 1, 1)
end
end

function mob16126_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16126', math.random(1500, 3000), 1)
end

function mob16126_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16126_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16126_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16126, 1, 'mob16126_Action')
RegisterUnitEvent(16126, 2, 'mob16126_Leave')
RegisterUnitEvent(16126, 3, 'mob16126_Kill')
RegisterUnitEvent(16126, 4, 'mob16126_Die')
